﻿using System;
using System.Collections.Generic;
using System.Text;

/**
*@file       worldobject.cs
*@brief      object of the world
*
*@author     graywind
*@version    1.0.0.1
*@data       2012/02/26
*/

namespace WorldObject
{
    //initialize objects
    public class ObjectInitializer
    {
        /// <summary>
        /// override this function later 
        /// </summary>
        protected virtual void DoInit()
        {

        }
    }

    //player object
    public partial class PlayerObject : ObjectInitializer
    {
        #region property
        //basic information of logic object
        private objectinfo.LogicObject m_objInfo = null;
        /// <summary>
        /// basic information of logic object
        /// </summary>
        public objectinfo.LogicObject ObjectInfo
        {
            get
            {
                return m_objInfo;
            }
            private set
            {
                m_objInfo = value;
            }
        }
        //detail information about this role
        private objectinfo.RoleInfoDetail m_detail = null;
        /// <summary>
        /// detail information about this role
        /// </summary>
        public objectinfo.RoleInfoDetail PlayerDetail
        {
            get
            {
                return m_detail;
            }
            private set
            {
                m_detail = value;
            }
        }
        #endregion

        #region constructor
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="logicObj"></param>
        /// <param name="detail"></param>
        public PlayerObject(objectinfo.LogicObject logicObj, objectinfo.RoleInfoDetail detail)
        {
            m_objInfo = logicObj;
            m_detail = detail;

            DoInit();
        }
        #endregion
    }

    //npc configure
    public class NpcData
    {

    }

    //npc object
    public partial class NpcObject : ObjectInitializer
    {
        #region property
        //basic information of logic object
        private objectinfo.LogicObject m_objInfo = null;
        /// <summary>
        /// basic information of logic object
        /// </summary>
        public objectinfo.LogicObject ObjectInfo
        {
            get
            {
                return m_objInfo;
            }
            private set
            {
                m_objInfo = value;
            }
        }
        //configure data
        private NpcData m_dataRef = null;
        /// <summary>
        /// configure data
        /// </summary>
        public NpcData DataReference
        {
            get
            {
                return m_dataRef;
            }
            private set
            {
                m_dataRef = value;
            }
        }
        #endregion

        #region constructor
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="objInfo"></param>
        /// <param name="data"></param>
        public NpcObject(objectinfo.LogicObject objInfo, NpcData data)
        {
            m_objInfo = objInfo;
            m_dataRef = data;

            DoInit();
        }
        #endregion
    }

    //monster configure
    public class MonsterData
    {

    }

    //monster object
    public partial class MonsterObject : ObjectInitializer
    {
        #region property
        //basic information of logic object
        private objectinfo.LogicObject m_objInfo = null;
        /// <summary>
        /// basic information of logic object
        /// </summary>
        public objectinfo.LogicObject ObjectInfo
        {
            get
            {
                return m_objInfo;
            }
            private set
            {
                m_objInfo = value;
            }
        }
        //configure data
        private MonsterData m_dataRef = null;
        /// <summary>
        /// configure data
        /// </summary>
        public MonsterData DataReference
        {
            get
            {
                return m_dataRef;
            }
            private set
            {
                m_dataRef = value;
            }
        }
        #endregion

        #region constructor
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="objInfo"></param>
        /// <param name="data"></param>
        public MonsterObject(objectinfo.LogicObject objInfo, MonsterData data)
        {
            m_objInfo = objInfo;
            m_dataRef = data;

            DoInit();
        }
        #endregion
    }
}